package com.ipacs.abs4j.testcode.absSchema;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;

public class TransactionalMessageProcessor extends MessageProcessor{
	
	private DefaultMessageProcessChain processChain ;
	private int PROPAGTION ;
	private int timeOut ;
	
	@Autowired
	private DataSourceTransactionManager transactionManager ;
	
	public TransactionalMessageProcessor() {
		
		this.PROPAGTION = 0 ;
	}

	@Override
	public void process(Context context) {
		// TODO Auto-generated method stub
		System.out.println("Transactional  process()... ");
		this.processChain.doProcess(context);
		
	}

	public DefaultMessageProcessChain getProcessChain() {
		return processChain;
	}

	public void setProcessChain(List<MessageProcessor> processor) {
		this.processChain = new DefaultMessageProcessChain() ;
		this.processChain.setProcessors(processor);
	}

	public int getPROPAGTION() {
		return PROPAGTION;
	}

	public void setPROPAGTION(int pROPAGTION) {
		PROPAGTION = pROPAGTION;
	}

	public int getTimeOut() {
		return timeOut;
	}

	public void setTimeOut(int timeOut) {
		this.timeOut = timeOut;
	}
	
	
	

}
